package creditcard.factory;

import creditcard.CCAccountObserver;
import creditcard.account.CreditCardAccount;
import framework.account.AAccount;
import framework.account.IAccount;
import framework.factory.IAccountFactory;

public class CCAccountFactory implements IAccountFactory {
    public IAccount createAccount(String type, String accountNumber) {
        AAccount account = new CreditCardAccount(type, accountNumber);
        account.addObserver(new CCAccountObserver(account));
        return account;
    }
}
